﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;

namespace DFGK_WMS.Model.Models
{
    /// <summary>
    /// 移库单明细
    /// </summary>
    [SqlSugar.SugarTable(tableName: "TTransferBinOrderDetails")]
    public partial class TTransferBinOrderDetail
    {
        [SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
        public int Id { get; set; }
        /// <summary>
        /// 移库单表Id
        /// </summary>
        public int? OrderId { get; set; }
        /// <summary>
        /// 移库单编号
        /// </summary>
        public string OrderSn { get; set; }
        /// <summary>
        /// 物料ID
        /// </summary>
        public int? MaterialId { get; set; }
        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; }
        /// <summary>
        /// 移库前库房Id
        /// </summary>
        public int? FromWhId { get; set; }
        /// <summary>
        /// 移库前库房名称
        /// </summary>
        public string FromWhName { get; set; }
        /// <summary>
        /// 移库前库房编码
        /// </summary>
        public string FromWhCode { get; set; }
        /// <summary>
        /// 移库前库房区域ID
        /// </summary>
        public int? FromRegionId { get; set; }
        /// <summary>
        /// 移库前库房区域名称
        /// </summary>
        public string FromRegionName { get; set; }
        /// <summary>
        /// 移库前逻辑分区：为逻辑分区编码，对应中间库T_SM_Region表的主键
        /// </summary>
        public string FromRegionCode { get; set; }
        /// <summary>
        /// 移库前库位ID(仓位号)
        /// </summary>
        public int? FromLocationId { get; set; }
        /// <summary>
        /// 移库前库位名称
        /// </summary>
        public string FromLocationName { get; set; }
        /// <summary>
        /// 移库前仓位编码
        /// </summary>
        public string FromLocationCode { get; set; }
        /// <summary>
        /// 移库后库房ID
        /// </summary>
        public int? ToWhId { get; set; }
        /// <summary>
        /// 移库后库房名称
        /// </summary>
        public string ToWhName { get; set; }
        /// <summary>
        /// 移库后库房编码
        /// </summary>
        public string ToWhCode { get; set; }
        /// <summary>
        /// 移库后库房区域ID
        /// </summary>
        public int? ToRegionId { get; set; }
        /// <summary>
        /// 移库后库房区域名称
        /// </summary>
        public string ToRegionName { get; set; }
        /// <summary>
        /// 移库后逻辑分区：为逻辑分区编码
        /// </summary>
        public string ToRegionCode { get; set; }
        /// <summary>
        /// 移库后库位ID
        /// </summary>
        public int? ToLocationId { get; set; }
        /// <summary>
        /// 移库后库位名称
        /// </summary>
        public string ToLocationName { get; set; }
        /// <summary>
        /// 移库后仓位编码(目标仓位)
        /// </summary>
        public string ToLocationCode { get; set; }
        /// <summary>
        /// 期望移库的垛数:立库必须整垛移库
        /// </summary>
        [Column(TypeName = "decimal(18,2)")]
        public decimal? ExpectedStackingQty { get; set; }
        /// <summary>
        /// 实际完成移库的垛数:立库会存在无法移库的情况，平库不存在
        /// </summary>
        [Column(TypeName = "decimal(18,2)")]
        public decimal? ActualStackingQty { get; set; }
        /// <summary>
        /// 调仓货品数量:立库则是该垛下物料总数量，平库则是人工需要拣货移库的数量（不一定是整箱移）
        /// </summary>
        public int? Quantity { get; set; }
        /// <summary>
        /// 是否满垛优先移库:Y优先满垛移库、N优先不满垛移库
        /// </summary>
        public bool? IsFullStackingProirity { get; set; }
        /// <summary>
        /// 移库订单执行的异常编码
        /// </summary>
        public string ExceptionCode { get; set; }
        /// <summary>
        /// 移库订单执行的异常文本
        /// </summary>
        public string ExceptionText { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }
        /// <summary>
        /// 创建人ID
        /// </summary>
        public int? CreateUserId { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        public string CreateUserName { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateDate { get; set; }
        /// <summary>
        /// 修改人ID
        /// </summary>
        public int? ModifyUserId { get; set; }
        /// <summary>
        /// 修改人
        /// </summary>
        public string ModifyUserName { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? ModifyDate { get; set; }
        /// <summary>
        /// 单据状态：0-创建;1-提交;2-审核通过;3-作业中；4-已完成;5-强制完成;6-失效；7-异常
        /// </summary>
        public int? Status { get; set; }
        public int? FilterType { get; set; }
        public string ToLogicalPartCode { get; set; }
        public int? IsPriorityFilling { get; set; }

        #region 西安煤科院
        /// <summary>
        /// 调整作业单
        /// </summary>
        //[NotMapped]
        //public string AdjustNo { get; set; }

        /// <summary>
        /// 库存类型
        /// </summary>
        public string StoreType { get; set; }

        /// <summary>
        /// 工厂
        /// </summary>
        public string Factory {  get; set; }

        /// <summary>
        /// 库存地点
        /// </summary>
        public string StockLocation { get; set; }

        /// <summary>
        /// 仓库号
        /// </summary>
        public string StorageNo { get; set; }

        /// <summary>
        /// 仓储区
        /// </summary>
        public string StorageArea { get; set; }

        /// <summary>
        /// 物料号
        /// </summary>
        public string MaterialNo { get; set; }

        /// <summary>
        /// 物料描述
        /// </summary>
        public string MaterialDesc { get; set; }

        /// <summary>
        /// 基本单位
        /// </summary>
        public string BaseUnit { get; set; }

        /// <summary>
        /// 批次号
        /// </summary>
        public string BatchNo { get; set; }

        /// <summary>
        /// 供应商编号
        /// </summary>
        public string SupplierNo { get; set; }

        /// <summary>
        /// 供应商名称
        /// </summary>
        public string SupplierName { get; set; }

        /// <summary>
        /// WBS码
        /// </summary>
        public string WbsCode { get; set; }

        /// <summary>
        /// 特殊库存标识
        /// </summary>
        public string StoreMark { get; set; }

        /// <summary>
        /// 调整数量
        /// </summary>
        [Column(TypeName = "decimal(18,2)")]
        public decimal AdjustQuantity { get; set; }

        /// <summary>
        /// 序列号启用标识
        /// </summary>
        public string SerialnoParam { get; set; }

        /// <summary>
        /// 要调整的物料序列号
        /// </summary>
        public string MaterialSerialize {  get; set; }
        #endregion
    }
}
